<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <!-- <link href="../static/bootstrap/css/bootstrap-responsive.css" rel="stylesheet" type="text/css"/>
    <link href="../static/bootstrap/css/docs.css" rel="stylesheet" type="text/css"/>
    -->
   <link href="/static/bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css"/>
   <link href="/static/viewback/css/mycss.css" rel="stylesheet" type="text/css"/>
   <title>帖子列表</title>
</head>
<body>
<include file="public:header"/>
<ul class="breadcrumb">
    <li>
      <a href="/Admin/user/userList" title="后台管理"><i class="icon-home"></i></a> <span class="divider">/</span>
    </li>
    <li>
      <a href="/Admin/posts/postsList" title="帖子管理">帖子管理</a> <span class="divider">/</span>
    </li>
    <li class="active" title="主题列表">主题列表</li>
 </ul>
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span2"> 
                <include file="public:leftbar"/>
            </div>
            <div class="span10">
                <div class="well">
                    <form class="form-inline" action="/Admin/posts/postsList" method="get">
                        <label for="posts_id" class="control-label">帖子ID</label>
                        <input name="posts_id" type="text" id="posts_id" class="span3" placeholder="帖子ID" autofocus/>
                        <label for="theme" class="control-label">帖子主题</label>
                        <input name="theme" type="text" id="theme" class="span3" placeholder="帖子主题"/>
                        <label for="forum" class="control-label">版区</label>
                        <select name="forum_id">
                            <option  value="">
                                —选择版区—
                            </option>
                            <volist name="forumList" id="forum">
                            <if condition="$forum.id == $_GET['forum_id']">
                                <option value="{$forum.id}" selected="selected">{$forum.forum_name}</option>
                            <else/>
                                <option value="{$forum.id}">
                                    {$forum.forum_name}
                                </option>
                            </if>
                            </volist>
                        </select>
                        <input class="btn btn-success" type="submit" value="搜索"/>
                    </form>
                </div>
                 <div class="alert alert-error" style="display: none" id="warning-alert">
                        <a class="close" data-dismiss="alert">×</a>
                        <h4 class="alert-heading">警告!</h4>
                        请慎重操作，一旦删除，无法恢复
                 </div>
                 <div class="progress progress-danger progress-striped active" style="display: none">
                       <div class="bar" style="width: 30%;"></div>
                 </div>
                <fieldset>
                        <legend><h3>主题列表</h3></legend>
                        <table class="table table-bordered table-hover" style="width:1090px;height: auto;">
                           <thead>
                               <tr><th>ID</th><th>主题</th><th>作者</th><th>是否精华帖</th><th>发表时间</th><th>版区</th><th>操作</th></tr>
                           </thead>
                           <tbody>
                               <volist name="postsList" id="list">
                                   <tr>
                                       <td>{$list.id}</td><td>{$list.theme}</td><td>{$list.author}</td></td><td><if  condition="$list.is_good eq 'yes' "><span class="label label-success">精华帖</span><else /><span class="label label-info">普通帖</span></if></td><td>{$list.dateline}</td><td>{$list.forum_name}</td>
                                       <td><a class="btn btn-success btn-mini" href="/Admin/posts/postsDetail?id={$list.id}">查看</a>
                                           <br/><if condition="$list.is_good eq 'no' "><a class="btn btn-warning btn-mini"  href="/Admin/posts/goodPosts?id={$list.id}&url=postsList&forum_id={$list.forum_id}">精华</a><else/><a class="btn btn-mini"  href="/Admin/posts/cancelGood?id={$list.id}&url=postsList&forum_id={$list.forum_id}">取消</a></if>
                                           <br/><a class="btn btn-danger btn-mini"  href="/Admin/posts/postsDrop?id={$list.id}" id="drop">删除</a>
                                       </td>
                                   </tr>
                               </volist>
                           </tbody>
                       </table>
                {$pagestring}
                </fieldset>
            </div>
        </div>
</div>
<include file="public:footer"/>
<script type="text/javascript" src="/static/bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="/static/bootstrap/js/bootstrap-popover.js"></script>
<script type="text/javascript" src="/static/viewback/js/jquery-1.8.3.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
        $('.btn-danger').click(function(){
            $('.alert').css('display','block');
           return confirm('确定删除？')            
        });
        
    });
</script>
</body>
</html>

